package com.boomsecret.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

/**
 * Created by Administrator on 2017/7/18.
 */

public class NetWorkChangeBroadcastReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        Toast.makeText(context, "Network change.", Toast.LENGTH_SHORT).show();
        abortBroadcast();   // 拦截广播 (对于有序广播才有效)
    }
}
